/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kotionokyurievna.gmail.com.callablethreads.threadPack;

import kotionokyurievna.gmail.com.callablethreads.logic.OneByOneArrayCreator;

/**
 *
 * @author Kateryna_Reznik
 */
public class MainThread {
    
    public static void main ( String args[] ){
        
        int threadNumber = 2;
        int bound = 9;
        
        if ((bound != 0) && (threadNumber > 0)){
            int min = bound;
        
            if ( bound > 0 ){
                min = -min;
            }
            
            int length = bound * 2 + 1;
            int step = 1;
            
            int arrayToCalculate[] = new OneByOneArrayCreator().create(min, step, length);
            ThreadExecutorMain threadEx = new ThreadExecutorMain(threadNumber, arrayToCalculate);
            System.out.println("" + threadEx.divideTask());
                    
        }
        
        
    }
}
